def show():
    print()


def show_a(x, a, b, c):
    if n == 1:
        print(a, c, sep="->")
    else:
        show_a(n - 1, a, c, b)
        show_a(1, a, b, c)
        show_a(n - 1, b, a, c)


n = int(input("请输入一个正整数："))
show_a(n, "a", "b", "c")
